<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="../../commons/taglibs.jsp"%>
<%@ include file="../../commons/list.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <style type="text/css">
  	input {
	text-align: center;
}
  </style>
  </head>
  <link rel="stylesheet" href="<%=basePath%>common/css/carCompetitiveDetail.css">

  <body>
<style>
body { margin-left: 200px; padding-top: 10px }
</style>
<form class="layui-form layui-form-pane"  action="">
	<input type="hidden" name="id" value="${carCompetitiveDetail1.id}">
	<input type="hidden" name="id1" value="${carCompetitiveDetail2.id}">
	<input type="hidden" name="competitiveid" value="${carCompetitiveDetail1.competitiveid}">
	<input type="hidden" name="competitiveid1" value="${carCompetitiveDetail2.competitiveid}">
    <table border="0" cellpadding="0" cellspacing="0" id="sheet0" class="sheet0 gridlines">
        <col class="col0">
        <col class="col1">
        <col class="col2">
        <col class="col3">
        
        <tbody>
          <tr class="row0">
            <td class="column0 style1 s">项目</td>
            <td class="column1 style2 s">参数</td>
            <td class="column2 style2 s"><input type="text" name='name' readonly="readonly" value="${carCompetitiveDetail1.name}"></td>
            <td class="column3 style2 s"><input type="text" name='name1' readonly="readonly" value="${carCompetitiveDetail2.name}"></td>
          </tr>
          <tr class="row1">
            <td class="column0 style3 s style3" rowspan="5">外观</td>
            <td class="column1 style2 s">长宽高（mm）</td>
             
             <td class="column2 style4 s"><textarea  name="lengthwidthheight" >${carCompetitiveDetail1.lengthwidthheight}</textarea></td>
            <td class="column3 style2 s"><textarea  name="lengthwidthheight1" >${carCompetitiveDetail2.lengthwidthheight}</textarea></td>
          </tr>
          <tr class="row2">
            <td class="column1 style2 s">轴距（mm）</td>
            <td class="column2 style4 n"><textarea  name="wheelbase" >${carCompetitiveDetail1.wheelbase}</textarea></td>
            <td class="column3 style2 n"><textarea  name="wheelbase1" >${carCompetitiveDetail2.wheelbase}</textarea></td>
          </tr>
          <tr class="row3">
            <td class="column1 style2 s style2" rowspan="2">轮胎</td>
            <td class="column2 style6 s"><textarea  name="frontwheel" >${carCompetitiveDetail1.frontwheel}</textarea></td>
            <td class="column3 style2 s"><textarea  name="frontwheel1" >${carCompetitiveDetail2.frontwheel}</textarea></td>
          </tr>
          <tr class="row4">
            <td class="column2 style4 s"><textarea  name="rearwheel" >${carCompetitiveDetail1.rearwheel}</textarea></td>
            <td class="column3 style2 s"><textarea  name="rearwheel1" >${carCompetitiveDetail2.rearwheel}</textarea></td>
          </tr>
          <tr class="row5">
            <td class="column1 style2 s">行李箱（L）</td>
            <td class="column2 style14 n"><textarea  name="trunk" >${carCompetitiveDetail1.trunk}</textarea></td>
            <td class="column3 style8 n"><textarea  name="trunk1" >${carCompetitiveDetail2.trunk}</textarea></td>
          </tr>
          <tr class="row6">
            <td class="column0 style9 s">内饰</td>
            <td class="column1 style10 null"></td>
            <td class="column2 style11 s"><textarea  name="decoration" readonly="readonly" >根据配置略有不同</textarea></td>
            <td class="column3 style12 s"><textarea  name="decoration1" readonly="readonly" >根据配置略有不同</textarea></td>
          </tr>
          <tr class="row7">
            <td class="column0 style2 s style2" rowspan="6">动力</td>
            <td class="column1 style2 s">功率（kw/rpm）</td>
            <td class="column2 style13 n"><textarea  name="power" >${carCompetitiveDetail1.power}</textarea></td>
            <td class="column3 style8 n"><textarea  name="power1" >${carCompetitiveDetail2.power}</textarea></td>
          </tr>
          <tr class="row8">
            <td class="column1 style2 s">扭矩（n.m/rpm）</td>
            <td class="column2 style13 n"><textarea  name="torque" >${carCompetitiveDetail1.torque}</textarea></td>
            <td class="column3 style8 n"><textarea  name="torque1" >${carCompetitiveDetail2.torque}</textarea></td>
          </tr>
          <tr class="row9">
            <td class="column1 style2 s">马力</td>
            <td class="column2 style13 n"><textarea  name="horsepower" >${carCompetitiveDetail1.horsepower}</textarea></td>
            <td class="column3 style8 n"><textarea  name="horsepower1" >${carCompetitiveDetail2.horsepower}</textarea></td>
          </tr>
          <tr class="row10">
            <td class="column1 style2 s">发动机</td>
            <td class="column2 style13 s"><textarea  name="engine" >${carCompetitiveDetail1.engine}</textarea></td>
            <td class="column3 style8 s"><textarea  name="engine1" >${carCompetitiveDetail2.engine}</textarea></td>
          </tr>
          <tr class="row11">
            <td class="column1 style2 s">变速箱</td>
            <td class="column2 style14 s"><textarea  name="changespeedcase" >${carCompetitiveDetail1.changespeedcase}</textarea></td>
            <td class="column3 style8 s"><textarea  name="changespeedcase1" >${carCompetitiveDetail2.changespeedcase}</textarea></td>
          </tr>
          <tr class="row12">
            <td class="column1 style2 s">工信部综合油耗（L/100km)</td>
            <td class="column2 style14 n"><textarea  name="oilconsume" >${carCompetitiveDetail1.oilconsume}</textarea></td>
            <td class="column3 style8 s"><textarea  name="oilconsume1" >${carCompetitiveDetail2.oilconsume}</textarea></td>
          </tr>
          <tr class="row13">
            <td class="column0 style10 s style16" rowspan="3">科技</td>
            <td class="column1 style10 null style16" rowspan="3"></td>
            <td class="column2 style14 s"><textarea  name="drivingcomputerdispaly" >${carCompetitiveDetail1.drivingcomputerdispaly}</textarea></td>
            <td class="column3 style8 s"><textarea  name="drivingcomputerdispaly1" >${carCompetitiveDetail2.drivingcomputerdispaly}</textarea></td>
          </tr>
          <tr class="row14">
            <td class="column2 style14 s"><textarea  name="pollenfiltrationsystem" >${carCompetitiveDetail1.pollenfiltrationsystem}</textarea></td>
            <td class="column3 style8 s"><textarea  name="pollenfiltrationsystem1" >${carCompetitiveDetail2.pollenfiltrationsystem}</textarea></td>
          </tr>
          <tr class="row15">
            <td class="column2 style14 s"><textarea  name="enginestartandstop" >${carCompetitiveDetail1.enginestartandstop}</textarea></td>
            <td class="column3 style8 s"><textarea  name="enginestartandstop1" >${carCompetitiveDetail2.enginestartandstop}</textarea></td>
          </tr>
          <tr class="row16">
            <td class="column0 style10 s style16" rowspan="3">安全</td>
            <td class="column1 style10 s style16" rowspan="3"></td>
            <td class="column2 style14 s"><textarea  name="safetyairbag" >${carCompetitiveDetail1.safetyairbag}</textarea></td>
            <td class="column3 style17 s"><textarea  name="safetyairbag1" >${carCompetitiveDetail2.safetyairbag}</textarea></td>
          </tr>
          <tr class="row17">
            <td class="column2 style18 s"><textarea  name="carnetwork" >${carCompetitiveDetail1.carnetwork}</textarea></td>
            <td class="column3 style8 s"><textarea  name="carnetwork1" >${carCompetitiveDetail2.carnetwork}</textarea></td>
          </tr>
          <tr class="row18">
            <td class="column2 style18 s"><textarea  name="safetechnology" >${carCompetitiveDetail1.safetechnology}</textarea></td>
            <td class="column3 style19 s"><textarea  name="safetechnology1" >${carCompetitiveDetail2.safetechnology}</textarea></td>
          </tr>
        </tbody>
    </table>
     <div class="layui-form-item" style="width: 85%;padding-left: 200px;padding-top: 30px">
	    <div class="layui-input-block">
	      <button class="layui-btn" id='tjsub' lay-submit lay-filter="formDemo">立即提交</button>
    	</div>
  	</div>
 </form>
 <script>

layui.use(['form'], function () {
    var $ = layui.jquery
        ,form = layui.form
        ,layer= layui.layer;
    
     var form = layui.form;
	  
	  //监听提交
	  form.on('submit(formDemo)', function(data){
		  debugger;
		  var field = JSON.parse(JSON.stringify(data.field));
		  var img = field.img;
		  field.img = $("#imgAddress").val();
	  	//提交成功后禁用按钮
		$("#tjsub").css("pointer-events","none"); 
	    //layer.msg(JSON.stringify(data.field));
	    $.post("<%=basePath%>/controller/carCompetitiveDetail/save",field,function (data){
	    	if(data == '0'){
	    		$("#tjsub").css("pointer-events","auto");
	    		layer.msg('提交成功', {time:1000}); 
	    		setTimeout("window.location.reload();",1500); 
	    	}else{
	    		$("#tjsub").css("pointer-events","auto");
	    		layer.msg('提交失败', {time:1000}); 
	    	}
	    })
	    return false;
	  });
    
});

</script>
  </body>
</html>
